package com.mine.distinctionteam.ui.shopnews;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.mine.distinctionteam.R;


public class ShopNewsActivity extends AppCompatActivity {
    private Context context=this;
    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop_news);

        Intent intent=getIntent();
        Bundle bundle=intent.getExtras();
        String Url=bundle.getString("link");

        webView= (WebView) findViewById(R.id.webview_shop_news);

        webView.loadUrl(Url);
//        在activity中显示网页内容
        webView.setWebViewClient(new WebViewClient());
//        支持javascript脚本语句
        webView.getSettings().setJavaScriptEnabled(true);
//        支持特殊的javascript脚本语句
        webView.setWebChromeClient(new WebChromeClient());
    }
}
